<!DOCTYPE html>
<%@page import="java.util.HashMap"%>
<%@page import="java.util.Map"%>
<%@page import="java.io.BufferedReader"%>
<%@page import="java.io.FileReader"%>
<%@page import="java.io.File"%>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>统计结果</title>

<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
      <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    
</head>
<body>
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;时间&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;浏览总次数
	<br />
	<%
		StringBuffer buffer = new StringBuffer();
		Map<String,Integer> maps = new HashMap<String,Integer>();
		File file = new File(System.getProperty("user.dir")
				+ File.separator + "result.txt");
		if (!file.exists())//如果文件不存，则建立
		{
			file.createNewFile();
		}
		FileReader reader = new FileReader(file);
		BufferedReader bufferedReader = new BufferedReader(reader);
		String line = "";
		while ((line = bufferedReader.readLine()) != null) {
			//buffer.append(line);
			String[] signalStr = line.split(" ");
			maps.put(signalStr[0], Integer.parseInt(signalStr[1].trim()));
			
	%>
	<%=signalStr[0]%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%=signalStr[1]%>
	<%
		out.print("<br>");
	%>

	<%
		for(int i=0;i<maps.keySet().size();i++){
			
			%>
			<%=maps.get(i) %>
			<%
		out.print("<br>");
	%>
		<%}
	
		}
		bufferedReader.close();
		reader.close();
	%>
	<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
	<script src="js/jquery.min.js"></script>
	<!-- Include all compiled plugins (below), or include individual files as needed -->
	<script src="js/bootstrap.min.js"></script>
</body>
</html>